package com.dmx.fw.util;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class GlobalSpringContext implements ApplicationContextAware {   
    private static ApplicationContext ac;   
  
           
    public static void setSpringContext(ApplicationContext ac) {   
    	GlobalSpringContext.ac = ac;          
	}   
	  
	/* (non-Javadoc)  
     * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)  
    */  
    public void setApplicationContext(ApplicationContext ac) throws BeansException {   
    	GlobalSpringContext.ac=ac;   
           
    }   
	static public ApplicationContext getApplicationContext(){   
	  
	   return ac;   
	}   
}  
